﻿using System;
using System.Linq;
using System.Net.Http;
using System.Text.Json.Serialization;

namespace Xc.DataAccess.OneNetCore.Services
{
    /// <summary>
    /// 查询设备状态请求
    /// </summary>
    public class QueryDevicesStatusRequest : RequestCore<QueryDevicesStatusRespond>
    {
        protected internal override string RequestPath => "devices/status";
        protected internal override HttpMethod HttpMethod => HttpMethod.Get;
        protected internal override bool SendBody => false;
        [JsonIgnore]
        public string[] DeviceIds { get; set; }
        /// <summary>
        /// 指定设备ID，多个用逗号分隔，最多100个
        /// </summary>
        [JsonPropertyName("device_id")]
        public string DevcieId => DeviceIds == null ? null : string.Join(',', DeviceIds);
    }
}
